var myUtil = {
    startLoading: function (dom) {
      var opts = {
        lines: 11 // The number of lines to draw
          ,
        length: 26 // The length of each line
          ,
        width: 2 // The line thickness
          ,
        radius: 33 // The radius of the inner circle
          ,
        scale: 0.25 // Scales overall size of the spinner
          ,
        corners: 0.9 // Corner roundness (0..1)
          ,
        color: '#000' // #rgb or #rrggbb or array of colors
          ,
        opacity: 0.25 // Opacity of the lines
          ,
        rotate: 0 // The rotation offset
          ,
        direction: 1 // 1: clockwise, -1: counterclockwise
          ,
        speed: 1 // Rounds per second
          ,
        trail: 70 // Afterglow percentage
          ,
        fps: 20 // Frames per second when using setTimeout() as a fallback for CSS
          ,
        zIndex: 2e9 // The z-index (defaults to 2000000000)
          ,
        className: 'spinner' // The CSS class to assign to the spinner
          ,
        top: '51%' // Top position relative to parent
          ,
        left: '50%' // Left position relative to parent
          ,
        shadow: false // Whether to render a shadow
          ,
        hwaccel: true // Whether to use hardware acceleration
          ,
        position: 'absolute' // Element positioning
      }
      var target = document.getElementById(dom)
      var spinner = new Spinner(opts).spin(target);
      $("#BgDiv").css({
        display: "block",
        height: $(document).height()
      });
      return spinner;
    },
    stopLoading: function (spinner) {
      $("#BgDiv").css("display", "none");
      spinner.stop();
    },
    queryString: function (val) {
      var uri = window.location.search;
      var re = new RegExp("" + val + "=([^&?]*)", "ig");
      return ((uri.match(re)) ? (uri.match(re)[0].substr(val.length + 1)) : null);
    }

  }
  //myUtil.initialize();